﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
using System.Security;
using System.Runtime.InteropServices;

namespace SmartFront.Toolkit.Core
{
    public static class StringExtensionMethods
    {
        /// <summary>
        /// Formats to invariant culture.
        /// </summary>
        /// <param name="format">The format.</param>
        /// <param name="args">The args.</param>
        /// <returns></returns>
        public static string FormatToInvariantCulture(this string format, params object[] args)
        {
            return String.Format(CultureInfo.InvariantCulture, format, args);
        }

        /// <summary>
        /// Formats to culture.
        /// </summary>
        /// <param name="format">The format.</param>
        /// <param name="culture">The culture.</param>
        /// <param name="args">The args.</param>
        /// <returns></returns>
        public static string FormatToCulture(this string format, CultureInfo culture, params object[] args)
        {
            return String.Format(culture, format, args);
        }
    }
}
